package com.AAA.service.Impl.mht;

import com.AAA.dao.mht.ITmhtTongJiMapper;
import com.AAA.entity.MyPage;
import com.AAA.entity.mht.MhtToolVo;
import com.AAA.service.mht.ITmhtTongJiService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class TmhtTongJiServiceImpl implements ITmhtTongJiService {
    @Autowired
    private ITmhtTongJiMapper mapper;

    @Override
    public PageInfo queryall(MyPage myPage, MhtToolVo mhtToolVo) {
        PageHelper.startPage(myPage.getPage(),myPage.getLimit());
        List<Map<String, Object>> queryall = mapper.queryall(mhtToolVo);
        PageInfo pageInfo = new PageInfo(queryall);
        return pageInfo;
    }

    @Override
    public List<Map<String, Object>> getNum() {
        return mapper.getNum();
    }
}
